import {Module} from '@nestjs/common';
import {DBModule} from "@/entitys/db.module";
import {UserModule} from "./user/user.module";
import {CompanyModule} from "@/modules/company/company.module";
import {QuoteModule} from "@/modules/quote/quote.module";
import {ReceiveOrderModule} from "@/modules/receiveOrder/receiveOrder.module";
import {SupplierModule} from "@/modules/supplier/supplier.module";
import {TourGroupModule} from "@/modules/tourGroup/tourGroup.module";
import {TourGroupArrangeModule} from "@/modules/tourGroupArrange/tourGroupArrange.module";
import {BillFlowModule} from "@/modules/finance/billFlow.module";
import {RequestModule} from "@/modules/request/request.module";
import {CacheModule} from "@/modules/cache/cache.module";
import {JwtComplyModule} from "@/modules/jwtModule/jwtComply.module";
import {APP_FILTER, APP_PIPE} from "@nestjs/core";
import {BadRequestExceptionFilter} from "@/filter/exceptionFilter/badRequestExceptionFilter";
import {CustomValidationPipe} from "@/filter/validator/pipes/CustomValidationPipe";
import {CommonModule} from "@/modules/common/common.module";

@Module({
    imports: [
        DBModule,
        JwtComplyModule,
        CacheModule,
        CompanyModule,
        QuoteModule,
        ReceiveOrderModule,
        UserModule,
        SupplierModule,
        TourGroupModule,
        TourGroupArrangeModule,
        BillFlowModule,
        RequestModule,
        CommonModule,

    ],
    controllers: [],
    providers: [
        {
            provide: APP_FILTER,
            useClass: BadRequestExceptionFilter,
        },
        {
            provide: APP_PIPE,
            useClass: CustomValidationPipe,
        }
    ],
    exports: [
    ]
})
export class AppModule {
}
